<template>
	<view class="grzx-body">
		<img :src="getImg('grzx-noimg.png')" class="zwscstyleimg" v-if="datas.length<=0">
		<div class="zwscstyle" v-if="datas.length<=0">暂无预订信息</div>
		<div class="homebj" v-if="datas.length>0">
		    <!-- 最新活动 -->
		    <div class="homermqnzj">
		        <div class="homermqnzjall" style="margin: 15px 15px 0px 0px;">
		            <div class="homermqnzjlist" v-for="(el,ind) in datas" @click="dwxqclick(el.id,el.book_time)">
		                <div class="homermqnzjleft dwxqleft">
		                    <img v-if="el.typeImg != ''" :src="getImg1(el.typeImg)" class="rmqnzjimg1">
		                    <img v-if="el.typeImg == ''" :src="getImg('noimg.png')" class="rmqnzjimg1">
		                    <img v-if="el.isTime == 1" :src="getImg('hdxqjxzicon.png')" class="rmqnzjimg2 dwxqwcimg">
		                    <img v-if="el.isTime == 2" :src="getImg('hdxqjxz.png')" class="rmqnzjimg2 dwxqwcimg">
		                    <img v-if="el.isTime == 3" :src="getImg('hdxqjxzactive.png')" class="rmqnzjimg2 dwxqwcimg">
		                </div>
		                <div class="homermqnzjright">
		                    <div class="homermqnzjname">{{el.name}}</div>
		                    <div class="dwxqmsdes active">地址：{{el.place}}</div>
		                    <div class="dwxqmsdes active">报名：<span v-if="el.isCheck == 0">已报名</span><span v-if="el.isCheck == 1">已入选</span><span v-if="el.isCheck == 2">未入选</span></div>
		                    <div class="dwxqmsdtime active">
		                        <img :src="getImg('dwxqmsdtime.png')" class="dwxqmsdtimeimg">
		                        <div class="dwxqmsdtimename">{{el.start_time}}-{{el.end_time}}</div>
		                    </div>
		                </div>
		            </div>
		        </div>
		    </div>
		</div>
	</view>
</template>

<script>
	import web from '../../components/utils/request.js';
	export default {
		data() {
			return {
				id: 0,
				datas: [],
			}
		},
		onLoad(options) {
			
		},
		onReady() {
			this.getData();
		},
		methods: {
			getImg(url) {
				return 'https://ruianm.tour-ma.com/r/cms/www/m/huodong/img/' + url;
			},
			getImg1(url) {
				return 'https://ruianm.tour-ma.com' + url;
			},
			getData(){
				var url = "/myVenues.jspx";
				var arg = {pageNo:1,pageSize: 1000};
				var that = this;
				web.httpPost(that, url, arg, function(res) {
					that.datas = res.data.data;
				})
			},
			dwxqclick: function(id,book_time) {//点击进入详情页
				uni.navigateTo({
					url: './cgyd?id='+id+'&book_time='+book_time
				});
			}
		}
	}
</script>

<style>
	@import url("@/components/css/datascss.css");
</style>
